home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / activate.zip / ACTIVATE.DOC < prev    next >
Text File  |  1992-12-04  |  3KB  |  75 lines

  1.  
  2.   Activate v1.01 Hard Disk Partition selector
  3.  
  4.   Author: Ronan Mullally October 1992.
  5.           < year3-23@midir.ucd.ie >
  6.           < H235_003@ccvax.ucd.ie >
  7.           < ronan@bermuda.ucd.ie >
  8.           < ronan.mullally@f151.n263.z2.fidonet.org >
  9.  
  10.  
  11.   Usage: Activate [-d] [-l] [partition #]
  12.  
  13.          -d: Deactivate given partition #
  14.          -l: List partition Table(s)
  15.          # : Number of partition to (De)Activate
  16.  
  17.          if no command line params are given -l is assumed
  18.  
  19.  
  20.   This is a fairly simple program to switch between the various partitions
  21.   you might want to boot off on your hard disk(s).  It provides a means of
  22.   setting / resetting the bootable flag on your partitions without having
  23.   to resort to fdisk (which has the potential to do a lot of damage!)
  24.  
  25.   USE THIS PROGRAM AT YOUR OWN RISK!  I make no guarentees that it will
  26.   not damage your data - all I will say is that it has done no harm to my
  27.   system - yet!  My own setup is with IDE drives: either 1 Quantum LP240,
  28.   or 2 Seagate ST-157A's, depending on whether I'm using Coherent, DOS,
  29.   or Linux - I've had no trouble with this configuration - I know absolutely
  30.   nothing about how non-IDE drives might behave.
  31.   
  32.   The source code is, hopefully, fairly portable.  I originally wrote it 
  33.   under Turbo C++ v3.0, then worked on a *nix based version under Coherent
  34.   v4.0.0.  The only routines which are implementation dependant are stored
  35.   seperately in the act-dos.c and act-ndos.c files (for MS-DOS and non-DOS
  36.   systems respectively).  These consist of the routines for accessing the
  37.   hard disk(s).  The DOS version uses the TC biosdisk() routine which 
  38.   accesses the drives via int 13h.  
  39.  
  40.   The *nix version reads / writes to the hard drive by simply opening the
  41.   drive's device (in my case /dev/rat0x, replace this with whatever is
  42.   appropriate) and using fread() / fwrite();  The determine_number_of_drives()
  43.   function is a bit of a 'cop-out', rather than trying to detect how many
  44.   drives are attached to the system I simply return a pre-defined constant -
  45.   set this (NUM_DRIVES) to whatever is appropriate.
  46.  
  47.   Everything you need to configure the program should be in the config.h
  48.   file, simply set up the correct number of drives, and (for *nix) their
  49.   names, then just compile.
  50.  
  51.   The program allows for 4 (primary) partitions on each drive - if you enter
  52.   too large a partition number (say 9 on a 2 drive system) it will abort.
  53.   It also only allows you to set 1 partition per drive as active - it will
  54.   disable all partitions on the relevant drive first, then make the given
  55.   partition active.  This can be changed by playing with the for-loop around
  56.   the '/* Deactivate all first */' comment.
  57.  
  58.  
  59.   This is the first (hopefully) useful program I've written for *nix, so
  60.   I'm sure there's plenty of room for improvement :-) I'd greatly appreciate
  61.   any comments, and suggestions (even flames!) via the email addresses above 
  62.   - the midir and ccvax addresses are only good until mid summer 1993, the 
  63.   bermuda address has a habit of bouncing mail not sent using SMTP, and I
  64.   have yet to receive any non-Fidonet mail at the fido address, so if you
  65.   _really_ want to contact me you can resort to snail-mail to:
  66.  
  67.         Ronan Mullally,
  68.         320 Sutton Park,
  69.         Sutton,
  70.         Dublin 13,
  71.         Ireland.  
  72.  
  73.  
  74.  
  75.